package com.itheima.d5_resource;

/*
     目标：认识try-catch-finally。
 */
public class Test1 {
    public static void main(String[] args) {
        method();
    }

    public static void method() {
        int[] ints = new int[]{1, 2, 3};
        try {
            System.out.println(ints[3]);
        } catch (Exception e) {
            System.out.println("方法出错");
        } finally {
            System.out.println("方法结束");
        }

    }
}
